aspell命令

aspell命令是一个交互式拼写检查器,其会扫描指定的文件或任何标准输入的文件,检查拼写错误,并允许交互式地纠正单词。

语法

aspell [options] command

参数

示例

example.txt文件内容如下:

The quick brown fox jumped over the extraordinarily lazy dog.

检查文件example.txt是否存在拼写错误,如果有拼写错误则出现选择式交互选项,如果没有拼写错误则不会出现交互式选项。

aspell -c sample.txt

使用aspell大量检查单词。运行时将等待用户输入,添加任意数量的单词,完成后按Ctrl + D完成输入,然后即可看到aspell将在输入的下方显示拼写错误的单词。

aspell list

参考

https://www.computerhope.com/unix/aspell.htm
https://www.tutorialspoint.com/unix_commands/aspell.htm
https://www.geeksforgeeks.org/aspell-command-in-linux-with-examples/